<?php
class mapdata extends items
{
	public function defaultaction()
	{
		$mapdata = new mapdatacollection($this->item);
		$mapdata->getwithdata();
		
		echo view::show('items/mapdata', array('mapdata'=>$mapdata));
	}
	
	public function lost()
	{
		$this->item->type = items::LOST;
		$this->show();
	}
	
	public function found()
	{
		$this->item->type = items::FOUND;
		$this->show();
	}
	
	protected function show()
	{
		$mapdata = new mapdatacollection($this->item);
		$mapdata->getwithdata();
		
		echo view::show('items/mapdata', array('mapdata'=>$mapdata));
	}
}